// maindlg.h : Declaration of the CMainDlg

#pragma once

#include "resource.h"       // main symbols

#include <atlhost.h>
#include <atlapp.h>
#include <atlmisc.h>
#include <atldlgs.h>

#include "ext\atlwinmisc.h"
#include "..\..\snbfilter\snbfilter_i.h"


// CMainDlg

class CMainDlg : 
	public CAxDialogImpl<CMainDlg>
{
public:
	CMainDlg()
	{
	}

	enum { IDD = IDD_MAINDLG };

BEGIN_MSG_MAP(CMainDlg)
	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
	COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
	COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
	COMMAND_HANDLER(IDC_BUTTON_SNBBROWSE, BN_CLICKED, OnSnbBrowse)
	COMMAND_HANDLER(IDC_BUTTON_TXTBROWSE, BN_CLICKED, OnTxtBrowse)
	//MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp);
	CHAIN_MSG_MAP(CAxDialogImpl<CMainDlg>)
END_MSG_MAP()

// Handler prototypes:
//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnSnbBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnTxtBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

protected:
	bool CheckEditInput();	
};


